<?php

/*

  Action	$5

  +4 Cards
  +1 Buy
  Each other player draws a card.

 */

class CouncilRoom extends Card implements iAction, iKingdom, iBasic {

    public function __construct() {
        parent::__construct("Council Room", 5);
        $this->undoPlay = false;
        $this->undoBuy = true;
    }

    public function getDescription() {
        return array(
            "+4 Cards",
            "+1 Buy",
            "Each other player draws a card.");
    }
    
    public function play(Game $game, $isRealCard) {

        $drawed_cards = $game->drawCards(4);
        $game->addBuys(1);
       
         ScreenDisplay::addScreenMessage($game, true, "get +1 buy and draw  ".nicePrint($drawed_cards), "gets +1 buy and draws ".sizeof($drawed_cards). "cards");
        
        $names = $game->getOtherPlayersNames();
        foreach ($names as $name) {
            $drawed_cards = $game->drawCards(1, $name);
             ScreenDisplay::addScreenMessage($game, true, "draw ".nicePrint($drawed_cards), "draws ".sizeof($drawed_cards). " cards", $name);
        }
        $game->cardActionFinished();
        return true;
    }

}

?>